<template>
  <div>
    <div>
      <p v-html="theCardTitle"></p >
      <button @click="sendMessage">OK</button>
    </div>
    <div>
      <ChildCard :parentMessage="parentMessage"></ChildCard>
    </div>
  </div>
</template>
<script>
import ChildCard from "../sub/ChildCard";
export default {
  data() {
    return {
      theCardTitle: "父组件",
      parentMessage: ""
    };
  },
  components: {
    ChildCard
  },
  methods: {
    sendMessage() {
      this.parentMessage = "<b>消息来自父组件：</b> (^_^)!";
    }
  },
};
</script>